<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="jstl-fn" prefix="fn" %>
<%@ taglib prefix="c" uri="jstl"%>
<jsp:include page="Templates/metas.jsp"/>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
		
		<jsp:include page="Templates/headerEng.jsp"/>
		
		<div id="container_aside">
		<span id="node_chat_njsd" class="ico_chat"></span>
       <jsp:include page="Templates/submenu_miredpostEng.jsp"/>
       
        <section id="container_right">
			<h1 class="mine_title"><img src="img/shadow_title.png" class="shadow_mineTit">MY REDPOST</h1>
				<h2 class="subtitle txt_blue underline">EDIT MY CREDIT/DEBIT CARD DATA</h2>
				<p class="txt_small txt_gray">
					With these tools you can change your credit/debit data to where we will charge.
					<br>
					Data with an asterisk (<span class="txt_red">*</span>) are indispensable.
				</p>
				<div align="center" class="txt txt_red">
	        		<html:errors/>
	        	</div>
	        	
				<ul class="cont_miredForms">
					<li>
						<html:form action="/mi_tarjeta_eng" method="post">
							<table class="table_reg">
								<tr>
									<td colspan="3">
										<c:if test="${ok ne '0' }">
											<p class="mensajeOk">
												<img alt="icoOk" src="img/icoOk.png" > Data updated correctly
											</p>
										</c:if>
									</td>
								</tr>
								<tr>
									<td align="right"><span class="txt_red">*</span>Primary account holder:</td>
									<td><input type="text" class="txt_input" size="20" name="ntt" id="nombreTar" onkeypress="return ValidCar(event);" value="${ntt}"/></td>
								</tr>
								<tr>
									<td align="right"><span class="txt_red">*</span>Card type: </td>
									<td>
										<html:select property="tt">
											<c:if test="${tt eq 'no' }">
												<option value="no" selected>Choose a card type</option>
											</c:if>
											<c:if test="${tt ne 'no' }">
												<option value="no" >Choose a card type</option>
											</c:if>
											<c:if test="${tt eq 'V' }">
												<option value="V" selected>VISA</option>
											</c:if>
											<c:if test="${tt ne 'V' }">
												<option value="V" >VISA</option>
											</c:if>
											<c:if test="${tt eq 'M' }">
												<option value="M" selected>MasterCard</option>
											</c:if>
											<c:if test="${tt ne 'M' }">
												<option value="M">MasterCard</option>
											</c:if>
											<c:if test="${tt eq 'A' }">
												<option value="A" selected>American Expres</option>
											</c:if>
											<c:if test="${tt ne 'A' }">
												<option value="A">American Expres</option>
											</c:if>
										</html:select>
									</td>
								</tr>
								<tr>
									<td align="right"><span class="txt_red">*</span>Card number:</td>
									<td><html:password styleClass="txt_input" size="20" property="nt" onkeypress="return ValidNum(event);"/></td>
								</tr>
								<tr>
									<td align="right"><span class="txt_red">*</span>Expiration date:</td>
									<td>										
										<html:select property="fvm" styleId="fvm">
										<option value="0">Month</option>
										<c:if test="${fvmSel eq '1'}">
											<option value="01" selected>01</option>
										</c:if>
										<c:if test="${fvmSel ne '1'}">
											<option value="01">01</option>
										</c:if>
										<c:if test="${fvmSel eq '2'}">
											<option value="02" selected>02</option>
										</c:if>
										<c:if test="${fvmSel ne '2'}">
											<option value="02">02</option>
										</c:if>
										<c:if test="${fvmSel eq '3'}">
											<option value="03" selected>03</option>
										</c:if>
										<c:if test="${fvmSel ne '3'}">
											<option value="03">03</option>
										</c:if>
										<c:if test="${fvmSel eq '4'}">
											<option value="04" selected>04</option>
										</c:if>
										<c:if test="${fvmSel ne '4'}">
											<option value="04">04</option>
										</c:if>
										<c:if test="${fvmSel eq '5'}">
											<option value="05" selected>05</option>
										</c:if>
										<c:if test="${fvmSel ne '5'}">
											<option value="05">05</option>
										</c:if>
										<c:if test="${fvmSel eq '6'}">
											<option value="06" selected>06</option>
										</c:if>
										<c:if test="${fvmSel ne '6'}">
											<option value="06">06</option>
										</c:if>
										<c:if test="${fvmSel eq '7'}">
											<option value="07" selected>07</option>
										</c:if>
										<c:if test="${fvmSel ne '7'}">
											<option value="07">07</option>
										</c:if>
										<c:if test="${fvmSel eq '8'}">
											<option value="08" selected>08</option>
										</c:if>
										<c:if test="${fvmSel ne '8'}">
											<option value="08">08</option>
										</c:if>
										<c:if test="${fvmSel eq '9'}">
											<option value="09" selected>09</option>
										</c:if>
										<c:if test="${fvmSel ne '9'}">
											<option value="09">09</option>
										</c:if>
										<c:if test="${fvmSel eq '10'}">
											<option value="10" selected>10</option>
										</c:if>
										<c:if test="${fvmSel ne '10'}">
											<option value="10">10</option>
										</c:if>
										<c:if test="${fvmSel eq '11'}">
											<option value="11" selected>11</option>
										</c:if>
										<c:if test="${fvmSel ne '11'}">
											<option value="11">11</option>
										</c:if>
										<c:if test="${fvmSel eq '12'}">
											<option value="12" selected>12</option>
										</c:if>
										<c:if test="${fvmSel ne '12'}">
											<option value="12">12</option>
										</c:if>
									</html:select>
									<html:select property="fva" styleId="fva">
										<option value="0">Year</option>
										<c:if test="${fvaSel eq '13'}">
											<option value="13" selected>13</option>
										</c:if>
										<c:if test="${fvaSel ne '13'}">
											<option value="13">13</option>
										</c:if>
										<c:if test="${fvaSel eq '14'}">
											<option value="14" selected>14</option>
										</c:if>
										<c:if test="${fvaSel ne '14'}">
											<option value="14">14</option>
										</c:if>
										<c:if test="${fvaSel eq '15'}">
											<option value="15" selected>15</option>
										</c:if>
										<c:if test="${fvaSel ne '15'}">
											<option value="15">15</option>
										</c:if>
										<c:if test="${fvaSel eq '16'}">
											<option value="16" selected>16</option>
										</c:if>
										<c:if test="${fvaSel ne '16'}">
											<option value="16">16</option>
										</c:if>
										<c:if test="${fvaSel eq '17'}">
											<option value="17" selected>17</option>
										</c:if>
										<c:if test="${fvaSel ne '17'}">
											<option value="17">17</option>
										</c:if>
										<c:if test="${fvaSel eq '18'}">
											<option value="18" selected>18</option>
										</c:if>
										<c:if test="${fvaSel ne '18'}">
											<option value="18">18</option>
										</c:if>
										<c:if test="${fvaSel eq '19'}">
											<option value="19" selected>19</option>
										</c:if>
										<c:if test="${fvaSel ne '19'}">
											<option value="19">19</option>
										</c:if>
									</html:select>
									</td>
								</tr>
								<tr>
									<td align="right"><span class="txt_red">*</span>Security code:</td>
									<td>
										<input type="password" name="cs" id="cs" value="${cs}" onkeypress="return ValidNum(event);" />
									</td>
								</tr>
								<tr>
									<td colspan="2">
										Do you wish to get a notification when charges go over USD $300.00?
										<br>
										<span class="txt_gray">
												<c:if test="${redpost[6] eq '1'  }">
													<input type="radio" name="notificacion" value="1" checked="checked"> Yes
												</c:if>
												<c:if test="${redpost[6] ne '1'  }">
													<input type="radio" name="notificacion" value="1"> Yes
												</c:if>
												<c:if test="${redpost[6] eq '0'  }">
													<input type="radio" name="notificacion" value="0" checked="checked"> No
												</c:if>
												<c:if test="${redpost[6] ne '0'  }">
													<input type="radio" name="notificacion" value="0"> No
												</c:if>
												I do not need a notification I want charges to go in automatically
											
										</span>
									</td>
								</tr>
								<tr>
									<td align="center" colspan="2">
										<a href="terminos.do" class="link_blue fancybox_aviso">See terms and conditions</a>
										<br>
										<span class="txt_gray">
										<c:if test="${privacidad eq '1'}">
											<input type="checkbox" name="privacidad" id="privacidad" checked value="1">
										</c:if> 
										<c:if test="${privacidad ne '1'}">
											<input type="checkbox" name="privacidad" id="privacidad" value="1">
										</c:if> 
										I have read the privacy notice</span>
									</td>
								</tr>
								<tr>
									<td colspan="2" align="center"><input type="image" src="img/btn_actualizaDatosEng.png"></td>
								</tr>
								
							</table>
						</html:form>
					</li>
					
					<!-- tarjeta de credito actual -->
					<li>
						<div class="cont_tarjetaActual">
							<b class="txt_red">Current data on your card are:</b>
							<br>
							<b class="txt_blue">Primary accounts holder:</b> ${redpost[5]}
							<br>
							<b class="txt_blue">Card type:</b> 
							<c:if test="${ redpost[2] eq 'V' }">VISA</c:if>
							<c:if test="${ redpost[2] eq 'M' }">MASTERCARD</c:if>
							<c:if test="${ redpost[2] eq 'A' }">AMEX</c:if>
							<br>
							<b class="txt_blue">Card number:</b>XXXX XXXX XXXX ${st}
							<br>
							<b class="txt_blue">Expired:</b> ${redpost[3]} / ${redpost[4]}
						</div>
					</li>
				</ul>
        </section>
        <span class="clear"></span>
        </div>
        
<jsp:include page="Templates/footerEng.jsp"/>
				<script type="text/javascript">           
			             function ValidCar(evt){
			            	 	if(window.event){ // IE
			            	 		key = evt.keyCode;
			            		 }else{
			            			 key = evt.which;
			            		 }
			            	 	
			                    if ( (key >= 48 && key <= 57) || key == 46 ){
				                    return false;
				                }else{
					                return true;
					            }
			             }
			        </script>